clear all; clc; close all

x = [0 5 5.05 5.3 5.8 5.9 6.3];
y = [0 0 10 9 16 18 20];

for i = length(x)-1:-1:1
     dx = x(end) - x(i);
     xm(i) = x(end) + dx;
end


xm = xm(end:-1:1);
x = [x xm];
y = [y y(end-1:-1:1)];

x = x / max(x);
n = 100;
[b, a] = yulewalk(n, x, y); 
[H w] = freqz(b, a); 


figure(1)
plot(w/max(w), abs(H), x,y)
